package com.awesome.lifecycledemo.activities;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;

import com.awesome.lifecycledemo.MyObserver;
import com.awesome.lifecycledemo.R;
import com.awesome.sdk.util.ShowLogUtil;

/**
 *
 */
public class LifecycleActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_lifecycle);
        getLifecycle().addObserver(new MyObserver());
    }

    @Override
    protected void onResume() {
        super.onResume();
        ShowLogUtil.info("onResume");
    }

    @Override
    protected void onPause() {
        super.onPause();
        ShowLogUtil.info("onPause");
    }
}